﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="GestionarTiposEventoFrm.aspx.cs" Inherits="ddcCajamarca.Web.AgendaCultural.GestionarTiposEventoFrm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="col-md-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-sm-9">
                        <h3><b>Gestionar Tipos de Eventos</b></h3>
                    </div>
                    <div class="col-sm-3">
                        <a href="TipoEventoFrm.aspx?opc=nuevo" class="btn btn-default">Nuevo Tipo de Evento </a>
                    </div>
                </div>
            </div>
            <div class="panel-body">
                <nav class="navbar navbar-default">
                    <div class="container">
                        <div class="form-group">
                            <div class="">
                                <div class="row">
                                    <div class="col-lg-4">
                                        <label>Criterio</label>
                                        <asp:TextBox ID="tbxCriterio" CssClass="form-control" placeholder="Ingrese nombre del tipo de evento" runat="server" />
                                    </div>
                                    <div class="col-md-1">
                                        <br />
                                        <asp:Button ID="btnBuscar" Text="Buscar" CssClass="btn btn-success" runat="server" />
                                    </div>

                                </div>
                            </div>

                        </div>
                    </div>
                    <!-- /.container -->
                </nav>
                <asp:UpdatePanel runat="server">
                    <ContentTemplate>
                        <asp:ListView ID="lvTipoEventos" runat="server"
                            ItemType="ddcCajamarca.BusinessEntities.AgendaCultural.TipoEvento"
                            SelectMethod="GetTipoEventos">
                            <EmptyDataTemplate>
                                <h3 class="message-error" align="center"><b>No hay Elementos que Mostrar.</b></h3>
                            </EmptyDataTemplate>
                            <LayoutTemplate>
                                <table class="table table-hover">
                                    <thead>
                                        <tr>
                                            <th>Nombre</th>
                                            <th>Descripción</th>
                                            <th>Acciones</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr id="itemPlaceholder" runat="server"></tr>
                                    </tbody>
                                </table>
                                <asp:DataPager ID="dpTipoEventos" PagedControlID="lvTipoEventos" runat="server" PageSize="15">
                                    <Fields>
                                        <asp:NextPreviousPagerField
                                            ButtonType="Link"
                                            ShowFirstPageButton="true"
                                            ShowLastPageButton="true"
                                            ShowNextPageButton="true"
                                            ShowPreviousPageButton="true" />
                                    </Fields>
                                </asp:DataPager>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td><%#Item.Nombre %></td>
                                    <td><%#Item.Descripcion %></td>
                                    <td>
                                        <a href="TipoEventoFrm.aspx?idTipoEvento=<%#Item.Id %>" class="glyphicon glyphicon-pencil label label-warning">&nbsp;Editar</a>
                                        <a href='TipoEventoFrm.aspx?idTipoEvento=<%#Item.Id %>&opc=delete'
                                            onclick='return confirm("Desea Eliminar este Evento: <%#Eval("Nombre") %>");' class="glyphicon glyphicon-remove label label-danger">&nbsp;Eliminar</a>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:ListView>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnBuscar" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
                
            </div>
        </div>
    </div>
</asp:Content>
